package com.ctgu.蓝桥杯真题.B组2018;

/**
 * @author: Backdiy
 * @data: 2021/4/12 15:18
 * @desc:
 */
public class B方格计数 {
    public static void main(String[] args) {
        int ans=0;
        for (int i = 1; i <= 1000; i++) {
            for (int j = 1; j <= 1000; j++) {
                if(i*i+j*j<=1000000){
                    ans++;
                }
            }
        }
        System.out.println(ans*4);
    }
}
